package za.org.jcicada.comms;

/**
 * ICommsConnector.java
 *
 * @author Simon Cross
 *
 * Created on December 5, 2008, 15:24
 */

import java.io.IOException;

/**
 * Interface for connecting to a particular katcomms acceptor (similar to
 * connecting to a accept socket with a client in TCP).  Calls to connect
 * return a IConnection for communicating with the server
 * attached to the acceptor.
 */
public interface IConnector {

    /**
     * Create a connection to an acceptor.
     *
     * @return IConnection object representing connection to remote side.
     * @throws IOException if setting up the connector fails.
     */
    IConnection connect() throws IOException;

}
